﻿using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;

namespace WhutDoomCheck.Server.Extentions
{
    public static class ControllerExtension
    {
        public static string GetIdentifier(this ControllerBase controller) =>
            controller.User.Claims.Where(c => c.Type == ClaimTypes.NameIdentifier).Select(c => c.Value).Single();
    }
}
